package cn.jtfadmin.activiti.service;

import cn.jtfadmin.activiti.domain.dto.FormDTO;

import java.util.Map;

public interface ActFormService {

    /**
     * 获取启动表单
     * @param deploymentId 部署id，必须
     * @return 启动表单信息
     */
    FormDTO getStartFormInfoByDeploymentId(String deploymentId);

    /**
     * 获取任务表单信息
     * @param taskId 任务id
     * @return
     */
    FormDTO getTaskFormInfoByTaskId(String taskId);



    FormDTO getTaskFormInfonByProcessDefinitionIdAndTaskDefinitionKey(String processDefinitionId, String taskDefinitionKey,
                                                                      String taskExecutionId);

    /**
     * 启动进程
     * @param deploymentId 部署id
     * @param formData 数据
     */
    void startForm(String deploymentId, String formData);

    /**
     * 任务呢表单完成,
     * @deprecated 记录中无法记录任务id,
     * @see org.activiti.engine.TaskService#complete(String, Map)
     * @param taskId
     * @param formData
     */
    @Deprecated
    void taskFormSubmit(String taskId, String formData);
}
